package triTree;

import triBasic.ISet;
import triStorage.*;

public class ReadableTriSet implements ISet<String> {

	private IReader reader;
	
	public ReadableTriSet(IReader reader) {
		this.reader = reader;
	}
	
	public String nextItem() {
		Integer flag;
		while (true) {
			flag = reader.readInt();
			if (flag == null)
				return null;
			if (flag == 0)
				reader.skipString();
			else
				break;
		}
		return reader.readString();
	}
	
	public void dispose() {
		reader.dispose();
	}
	
}
